import loginPage from "@/view/loginPage";
import manggerCenter from "@/view/manggerCenter";
import dataPage from '@/view/dataPage/dataPage.vue'
import {globalValue} from "@/core/config/globalConfig";
import {adminMain} from "@/router/adminMain";
import reFresh from "@/router/reFresh";
//引入vue-router

const routeMsg = {
    mode:'history',//去除#号
    routes: [              //配置路由，这里是个数组
        {   //配置默认路由
            path:'/',
            redirect:'/dataPage',
            component: dataPage,
            meta:{
                showInbreadcrumb:true,
                title:globalValue.protectTitle(),
                mustLogin:true
            }
        },
        {
            path:'/login',
            component:loginPage,
            meta:{
                showInbreadcrumb:true,
                title:'用户登录'
            }
        },
        {
            path:'/manggerCenter',
            component: manggerCenter,
            meta:{
                showInbreadcrumb:false,
                title:globalValue.protectTitle(),
                mustLogin:true
            },
            children:adminMain
        },
        {
            path: '/refresh',
            component: reFresh
        },
        {
            path: '/*',
            component: ()=>import('@/components/error/notFound.vue'),
            meta:{
                title: 'Not Found'
            }
        }
    ]
};






export default routeMsg;
